{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw11900\paperh16840\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural

\f0\fs24 \cf0 CREATE TABLE `comics`.`alter_page`\
(\
   id bigint PRIMARY KEY NOT NULL,\
   version bigint NOT NULL,\
   commentable bit NOT NULL,\
   created_by_id bigint NOT NULL,\
   date_created timestamp NOT NULL,\
   description longtext,\
   disabled bit NOT NULL,\
   ext_file varchar(255) NOT NULL,\
   home_page_id bigint NOT NULL,\
   last_updated timestamp NOT NULL,\
   name varchar(50) NOT NULL,\
   path_file varchar(255) NOT NULL,\
   rateable bit NOT NULL\
)\
;\
CREATE TABLE `comics`.`alter_page_comment`\
(\
   alter_page_coments_id bigint,\
   comment_id bigint\
)\
;\
CREATE TABLE `comics`.`alter_page_rate`\
(\
   alter_page_ratings_id bigint,\
   rate_id bigint\
)\
;\
CREATE TABLE `comics`.`author`\
(\
   id bigint PRIMARY KEY NOT NULL,\
   version bigint NOT NULL,\
   bird_day timestamp NOT NULL,\
   commentable bit NOT NULL,\
   country varchar(255) NOT NULL,\
   created_by_id bigint NOT NULL,\
   date_created timestamp NOT NULL,\
   description longtext,\
   disabled bit NOT NULL,\
   ext_file varchar(255) NOT NULL,\
   gender varchar(255) NOT NULL,\
   last_updated timestamp NOT NULL,\
   lastname varchar(255) NOT NULL,\
   name varchar(50) NOT NULL,\
   name_file varchar(255) NOT NULL,\
   path_file varchar(255) NOT NULL,\
   rateable bit NOT NULL\
)\
;\
CREATE TABLE `comics`.`author_tag`\
(\
   author_tags_id bigint,\
   tag_id bigint\
)\
;\
CREATE TABLE `comics`.`comic`\
(\
   id bigint PRIMARY KEY NOT NULL,\
   version bigint NOT NULL,\
   commentable bit NOT NULL,\
   created_by_id bigint NOT NULL,\
   date_created timestamp NOT NULL,\
   description longtext,\
   disabled bit NOT NULL,\
   last_updated timestamp NOT NULL,\
   name varchar(50) NOT NULL,\
   name_file varchar(255) NOT NULL,\
   rateable bit NOT NULL\
)\
;\
CREATE TABLE `comics`.`comic_rate`\
(\
   comic_ratings_id bigint,\
   rate_id bigint\
)\
;\
CREATE TABLE `comics`.`comic_tag`\
(\
   comic_tags_id bigint,\
   tag_id bigint\
)\
;\
CREATE TABLE `comics`.`comment`\
(\
   id bigint PRIMARY KEY NOT NULL,\
   version bigint NOT NULL,\
   comment longtext NOT NULL,\
   commented_by_id bigint NOT NULL,\
   date_created timestamp NOT NULL,\
   disabled bit NOT NULL,\
   last_updated timestamp NOT NULL\
)\
;\
CREATE TABLE `comics`.`comment_comment`\
(\
   comment_comments_id bigint,\
   comment_id bigint\
)\
;\
CREATE TABLE `comics`.`compilation`\
(\
   id bigint PRIMARY KEY NOT NULL,\
   version bigint NOT NULL,\
   date_created timestamp NOT NULL,\
   description longtext,\
   disabled bit NOT NULL,\
   last_updated timestamp NOT NULL,\
   name varchar(50) NOT NULL,\
   path varchar(255) NOT NULL\
)\
;\
CREATE TABLE `comics`.`compilation_comic`\
(\
   compilation_comics_id bigint,\
   comic_id bigint\
)\
;\
CREATE TABLE `comics`.`compilation_rate`\
(\
   compilation_ratings_id bigint,\
   rate_id bigint\
)\
;\
CREATE TABLE `comics`.`compilation_tag`\
(\
   compilation_tags_id bigint,\
   tag_id bigint\
)\
;\
CREATE TABLE `comics`.`note`\
(\
   id bigint PRIMARY KEY NOT NULL,\
   version bigint NOT NULL,\
   created_by_id bigint NOT NULL,\
   date_created timestamp NOT NULL,\
   disabled bit NOT NULL,\
   last_updated timestamp NOT NULL,\
   text varchar(100) NOT NULL\
)\
;\
CREATE TABLE `comics`.`page`\
(\
   id bigint PRIMARY KEY NOT NULL,\
   version bigint NOT NULL,\
   comic_id bigint,\
   commentable bit NOT NULL,\
   created_by_id bigint NOT NULL,\
   date_created timestamp NOT NULL,\
   description longtext,\
   disabled bit NOT NULL,\
   ext_file varchar(255) NOT NULL,\
   last_updated timestamp NOT NULL,\
   name varchar(50) NOT NULL,\
   name_file varchar(255) NOT NULL,\
   number_page int,\
   path_file varchar(255) NOT NULL,\
   rateable bit NOT NULL\
)\
;\
CREATE TABLE `comics`.`page_rate`\
(\
   page_ratings_id bigint,\
   rate_id bigint\
)\
;\
CREATE TABLE `comics`.`rate`\
(\
   id bigint PRIMARY KEY NOT NULL,\
   version bigint NOT NULL,\
   date_created timestamp NOT NULL,\
   last_updated timestamp NOT NULL,\
   rate real NOT NULL,\
   rated_by_id bigint NOT NULL\
)\
;\
CREATE TABLE `comics`.`tag`\
(\
   id bigint PRIMARY KEY NOT NULL,\
   version bigint NOT NULL,\
   date_created timestamp NOT NULL,\
   description longtext NOT NULL,\
   disabled bit NOT NULL,\
   last_updated timestamp NOT NULL,\
   name varchar(50) NOT NULL\
)\
;\
CREATE TABLE `comics`.`user`\
(\
   id bigint PRIMARY KEY NOT NULL,\
   version bigint NOT NULL,\
   admin bit NOT NULL,\
   alias varchar(255) NOT NULL,\
   bird_day timestamp NOT NULL,\
   commentable bit NOT NULL,\
   country varchar(255) NOT NULL,\
   date_created timestamp NOT NULL,\
   disabled bit NOT NULL,\
   email varchar(255) NOT NULL,\
   gender varchar(255) NOT NULL,\
   last_name varchar(255) NOT NULL,\
   last_updated timestamp NOT NULL,\
   name varchar(255) NOT NULL,\
   name_file varchar(255),\
   password varchar(255) NOT NULL,\
   rateable bit NOT NULL\
)\
;\
CREATE INDEX FKD587F918747FE5D7 ON alter_page(created_by_id)\
;\
CREATE UNIQUE INDEX PRIMARY ON alter_page(id)\
;\
CREATE INDEX FKD587F9188E69F41A ON alter_page(home_page_id)\
;\
CREATE UNIQUE INDEX name ON alter_page(name)\
;\
CREATE INDEX FK9A1EF638D176793A ON alter_page_comment(comment_id)\
;\
CREATE INDEX FK9A1EF638C505C85D ON alter_page_comment(alter_page_coments_id)\
;\
CREATE INDEX FK9BEFFBA7A39F4CB0 ON alter_page_rate(alter_page_ratings_id)\
;\
CREATE INDEX FK9BEFFBA73AC539DA ON alter_page_rate(rate_id)\
;\
CREATE UNIQUE INDEX PRIMARY ON author(id)\
;\
CREATE INDEX FKAC2D218B747FE5D7 ON author(created_by_id)\
;\
CREATE UNIQUE INDEX name ON author(name)\
;\
CREATE INDEX FKA68852E6288035F8 ON author_tag(author_tags_id)\
;\
CREATE INDEX FKA68852E6CB7A9B5A ON author_tag(tag_id)\
;\
CREATE UNIQUE INDEX PRIMARY ON comic(id)\
;\
CREATE UNIQUE INDEX name ON comic(name)\
;\
CREATE INDEX FK5A7325B747FE5D7 ON comic(created_by_id)\
;\
CREATE INDEX FK5DC11444EBDD4223 ON comic_rate(comic_ratings_id)\
;\
CREATE INDEX FK5DC114443AC539DA ON comic_rate(rate_id)\
;\
CREATE INDEX FK9FED7BB6CB7A9B5A ON comic_tag(tag_id)\
;\
CREATE INDEX FK9FED7BB6B4D6AB58 ON comic_tag(comic_tags_id)\
;\
CREATE INDEX FK38A5EE5FB5E52DAD ON comment(commented_by_id)\
;\
CREATE UNIQUE INDEX PRIMARY ON comment(id)\
;\
CREATE INDEX FK2D72B47FB00A9BA5 ON comment_comment(comment_comments_id)\
;\
CREATE INDEX FK2D72B47FD176793A ON comment_comment(comment_id)\
;\
CREATE UNIQUE INDEX PRIMARY ON compilation(id)\
;\
CREATE UNIQUE INDEX name ON compilation(name)\
;\
CREATE INDEX FK7F67F4DFD66ACB69 ON compilation_comic(compilation_comics_id)\
;\
CREATE INDEX FK7F67F4DFDFC29FBA ON compilation_comic(comic_id)\
;\
CREATE INDEX FKB9D029DC3AC539DA ON compilation_rate(rate_id)\
;\
CREATE INDEX FKB9D029DCEFF82923 ON compilation_rate(compilation_ratings_id)\
;\
CREATE INDEX FK7159531ECB7A9B5A ON compilation_tag(tag_id)\
;\
CREATE INDEX FK7159531E97F4F228 ON compilation_tag(compilation_tags_id)\
;\
CREATE UNIQUE INDEX PRIMARY ON note(id)\
;\
CREATE INDEX FK33AFF2747FE5D7 ON note(created_by_id)\
;\
CREATE UNIQUE INDEX PRIMARY ON page(id)\
;\
CREATE UNIQUE INDEX name ON page(name)\
;\
CREATE INDEX FK34628FDFC29FBA ON page(comic_id)\
;\
CREATE INDEX FK34628F747FE5D7 ON page(created_by_id)\
;\
CREATE INDEX FK34ADE4903AC539DA ON page_rate(rate_id)\
;\
CREATE INDEX FK34ADE490A2893DE3 ON page_rate(page_ratings_id)\
;\
CREATE INDEX FK354CE05A55D173 ON rate(rated_by_id)\
;\
CREATE UNIQUE INDEX PRIMARY ON rate(id)\
;\
CREATE UNIQUE INDEX PRIMARY ON tag(id)\
;\
CREATE UNIQUE INDEX name ON tag(name)\
;\
CREATE UNIQUE INDEX PRIMARY ON user(id)\
;\
}